<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>Thymeleaf简单语法</h1>
<div>
    <h5>基本类型操作（字符串）</h5>
    <p>一个简单的字符串：<span th:text="'thymeleaf text'">default text</span>.</p>
    <p>字符串连接 <span th:text="'thymeleaf text concat,'+${thymeleafText}">default text</span></p>
    <p>字符串连接: <span th:text="|thymeleaf text concat,${thymeleafText}|"></span></p>
</div>
<div>
    <h5>基本类型操作（数字）</h5>
    <p>一个简单的神奇的数字： <span th:text="2019">1000</span>.</p>
    <p>算术运算：2019+1= <span th:text="${number1} + 1">0</span>.</p>
    <p>算术运算：14 - 1 = <span th:text="14 - 1">0</span></p>
    <p>算术运算：40 * 20 = <span th:text="40 * ${number2}">0</span></p>
    <p>算术运算：40 / 10 = <span th:text="40 / 10">0</span></p>
</div>
<div>
    <h5>基本类型操作（布尔值）</h5>
    <p>一个简单的数字比较：2019 > 2018= <span th:text="2019&gt;2018"></span></p>
    <p>字符串比较：thymeleafText1 == 'shiyanlou'，结果为 <span th:text="${thymeleafText1} == 'shiyanlou'"></span></p>
    <p>数字比较：13 == 39/3，结果为: <span th:text="13 == 39/3">0</span></p>
</div>
<div>
    <h5>水果</h5>
    <p>水果名称（saleGoods.getGoodsName()）： <span th:text="${saleGoods.getGoodsName()}">--</span></p>
    <p></p>
    <p></p>
</div>
</body>
</html>